package com.kitkat.entities;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@NamedQueries({
	@NamedQuery(name="getUserByEmail",query="from User u where u.email=:email")
})

@Entity
@Table(name="t_user")
public class User implements Serializable{
	@Id
	@GeneratedValue(generator="uuid")
	@GenericGenerator(name="uuid",strategy="uuid")
	private String id;
	@Column(unique=true)
	private String email;
	@Column
	private String password;
	@Column
	private String activeCode;
	@Column
	private boolean actived;
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getActiveCode() {
		return activeCode;
	}
	public void setActiveCode(String activeCode) {
		this.activeCode = activeCode;
	}
	public boolean isActived() {
		return actived;
	}
	public void setActived(boolean actived) {
		this.actived = actived;
	}
	
	public User(){
		
	}
	public User(String email, String password, String activeCode) {
		super();
		this.email = email;
		this.password = password;
		this.activeCode = activeCode;
		this.actived = false;
	}
	
	
}
